#ifndef RSPBASE_H
#define RSPBASE_H
#include <QMap>
#include "Main/qstringhandle.h"

class RspBase
{
public:
    RspBase();

public:
    QString ToString()
    {
        QString sEncode = GESS_FLD_SEPERATOR;

    //    MAP_KEYVAL::iterator it;
        for(auto it = m_mapParameters.begin();it!=m_mapParameters.end();++it)
        {
            sEncode += it.key();
            sEncode += "=";
            sEncode += it.value();
            sEncode += GESS_FLD_SEPERATOR;
        }
        return sEncode;
    }

    void ParseRspBody(const QString qsPkt);
    QString GetQStringPara(const QString sKey);

    void RemoveItem(const QString sKey);
protected:
//    typedef std::map<QString,QString> MAP_KEYVAL;
//    MAP_KEYVAL m_mapParameters;
    QMap<QString,QString> m_mapParameters;
};

#endif // RSPBASE_H
